﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace my_console
{
    public class Triangle : Shape
    {
        public double A { get; } 
        public double B { get; } 
        public double C { get; } 

        public Triangle(double a, double b, double c)
        {
            A = a;
            B = b;
            C = c;
        }

        public double CalculateArea()
        {
            double s = (A + B + C) / 2;
            return Math.Sqrt(s * (s - A) * (s - B) * (s - C));
        }

        public bool IsValid()
        {
            bool res = true ;
            if (A + B >= C) res = false;
            if (A + C >= B) res = false;
            if (B + C >= A) res = false;
            return res;
        }
    }
}
